<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head >
        <th:block th:include="common/form :: head" />
        <link rel="stylesheet" type="text/css" href="../../assets/pictureUpload/pictureUpload.css" />
        <script type="text/javascript" src="../../assets/libs/webuploader/webuploader.min.js"></script>
        <script src="../../assets/pictureUpload/pictureUpload.js"></script>
    </head>
	<body class="mainbody">
		<form method="POST" th:object="${obj}">
			<div th:replace="common/form :: location('素材管理',*{id} gt 0 ?'修改信息':'新增信息')"></div>
			<div id="floatHead" class="content-tab-wrap">
			  <div class="content-tab">
			    <div class="content-tab-ul-wrap">
			      <ul>
			        <li><a href="javascript:;">素材管理信息</a></li>
			      </ul>
			    </div>
			  </div>
			</div>

			<div class="tab-content">
				<dl>
					<dt>名称</dt>
					<dd>
						<input th:field="*{name}"  maxlength="50"  class="input normal" data-type="*" />
						<span class="Validform_checktip">*请输入名称</span>
					</dd>
				</dl>
                <dl>
                    <dt>图片</dt>
                    <dd th:if="*{id}==0">
                        <div id="uploader">
                            <div class="queueList">
                                <div id="dndArea" class="placeholder">
                                    <div id="filePicker"></div>
                                </div>
                                <ul class="filelist">
                                </ul>
                            </div>
                            <div class="statusBar" style="display:none;">
                                <div class="progress">
                                    <span class="text">0%</span>
                                    <span class="percentage"></span>
                                </div>
                                <div class="info"></div>
                                <div class="btns">
                                    <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                                </div>
                            </div>
                        </div>
                    </dd>
                    <dd th:if="*{id} gt 0">
                        <div id="uploader">
                            <div class="queueList filled">
                                <ul class="oldFileList">
                                    <li th:each="fi:${files}" th:object="${fi}" class="state-complete">
                                        <p class="imgWrap">
                                            <img th:src="*{imgUrl}" onmouseover="show(this)" />
                                        </p>
                                        <div class="file-panel" th:id="'delete_'+*{id}" onmouseleave="hide(this)">
                                            <span class="cancel" th:onclick="'delectFile('+*{id}+',this)'">删除</span>
                                        </div>
                                        <span class="success"></span>
                                    </li>
                                </ul>
                                <ul class="filelist">

                                </ul>
                            </div>
                            <div class="statusBar">
                                <div class="progress">
                                    <span class="text">0%</span>
                                    <span class="percentage"></span>
                                </div>
                                <div class="info"></div>
                                <div class="btns">
                                    <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                                </div>
                            </div>
                        </div>
                    </dd>
                </dl>
			</div>
			
			<div class="page-footer" th:fragment="footer">
			   <div class="btn-wrap" style="position:static;">	
			   <input type="submit" name="btnSubmit" value="提交保存" id="btnSubmit" class="btn" /> 		    
			    <input type="button" value="返回列表页" class="btn yellow" onclick="javascript:history.back(-1);" />
			  </div>
			</div> 
					
		</form>
		<script type="text/javascript" th:replace="common/form :: formscript"></script>
        <script>
        </script>
	</body>
</html>